<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Question_List</title>
    <style>
        .container .navbar{
            width:100%;
            height:50px;
            background-color: black;
            /* 给父级标签设置overflow，取消后续float的影响 */
            overflow: hidden;
           
        }
        .container .navbar a{
            /* 设置a标签为行内块元素，才能设置属性 */
            display: inline-block;
            color: white;
            font-size: larger;
            /* 设置文字高度和导航栏一致 */
            line-height: 50px;
            text-decoration: none;
            /* 设置每个标签宽度 */
            width: 80px;
            /* 设置文字居中 */
            text-align: center;
        }
        .container .navbar a:hover{
            background-color: red;
        }
        .container .navbar .login{
            float: right;
        }
        .container .question_list{
            padding-top: 10px;
            width:100%;
            height: 600px;
            margin: 0px auto;

            text-align: center;
        }
        .container .question_list table{
            margin-top: 50px;
            width: 100%;
            font-size: large;
            font-family:Georgia, 'Times New Roman', Times, serif;
            background-color: gainsboro;
        }
        .container .question_list table .theme{
            width: 100px;
            height: 30px;
            padding: 10px auto;
            font-size: larger;
            font-family: 'Times New Roman', Times, serif;
        }
        .container .question_list table .theme a{
            text-decoration: none;
            color: black;
        }
        .container .question_list table .theme a:hover{
            color: gray;
            text-decoration: underline;
        }
        .container .footer{
            width: 100%;
            height: 50px;
            text-align: center;
            line-height: 50px;
            color: black;
            margin-top:  15px;;
            
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="navbar">
            <a href = "#"> 首页</a>
            <a href = "/all"> 题库</a>
            <a href = "#"> 讨论</a>
            <a class = "login" href = "#"> 登录</a>
        </div>
        <div class="question_list">
            <h1>题目列表</h1>
            <table>
                <tr>
                    <td class = "theme">编号</td>
                    <td class = "theme">名称</td>
                    <td class = "theme">难度</td>
                </tr>
                {{#question_list}}
                <tr>
                <td class = "theme">{{number}}</td>
                <td class = "theme"><a href="/questions/{{number}}">{{title}}</a></td>
                <td class = "theme">{{difficulty}}</td>
                </tr>
                {{/question_list}}
            </table>
        </div>
        <div class="footer">
            <h4>@zjh</h4>
        </div>
    </div>
</body>
</html>
